///1 滚动函数
function scroll(){
	if(window.pageXOffset  !== null){
		return{
			left:window.pageXOffset,
			top:window.pageYOffset
		}
			}
		else if(document.compatMode === 'CSS1Compat'){
			return{
				left: document.documentElement.scrollLeft,
				top:document.documentElement.scrollTop
			}
				}
				return{
					top:document.body.scrollTop,
					left:document.body.scrollLeft
				}
	
}
function $(id) {
    return typeof id === "string" ? document.getElementById(id) : null;
}
function show(obj) {
    return obj.style.display = 'block';
}

function hide(obj) {
    return obj.style.display = '';
}
// 通用函数获取屏幕发宽度和高度

function client(){
	if(window.innerWidth){
		return{
			width:window.innerWidth,
			height:window.innerHeight
		}
	}else if(document.compatMode ==='CSS1Compat'){
		return{
			width:document.documentElement.clientWidth,
			height:document.documentElement.clientHeight
		}
	}
	return{
		width:document.body.clientWidth,
		height:document.body.clientHeight
	}
	
	
	
}